package org.yourscrum.domain;

import com.google.appengine.api.datastore.Key;

import javax.jdo.annotations.*;

/**
 * @author Jettro Coenradie
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Theme {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk",value="true")
    private String encodedKey;

    @Persistent
    @Extension(vendorName="datanucleus", key="gae.pk-id", value="true")
    private Long id;

    @Persistent
    private String name;

    @Persistent
    private String description;

    public Theme(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public void changeName(String newName) {
        this.name = newName;
    }

    public void changeDescription(String newDescription) {
        this.description = newDescription;
    }

    /* Getters */
    public Long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }
}
